package pattern.behavioral.observer.simple;

/**
 * @author: chaoyang.ren  
 * @date:Jun 2, 2017  
 * @time:3:17:43 PM   
 * @email:chaoyang.ren@foxmail.com  
 * @version: 1.0
 */
public class Test {
	public static void main(String[] args) {
		NewsCenter newsCenter = new NewsCenter();
		newsCenter.addObserver(new Subscriber1());
		newsCenter.addObserver(new Subscriber2());
		final String news = "特朗普说“德国人真坏,太坏了”";
		newsCenter.publishNews(news);
	}
}

